// 注册路由级
const router = require('koa-router')()
const indexRoutes = require('./routes/index.js')
const usersRoutes = require('./routes/users.js')

// router.prefix('api_v1')

router.use('/home', indexRoutes.routes(), indexRoutes.allowedMethods())
router.use('/users', usersRoutes.routes(), usersRoutes.allowedMethods())

router.redirect('/', '/home')
module.exports = router